﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Security.Permissions;

namespace DotNetNuke.Modules.AjaxWebLinks.Components
{
    public class ServiceSecurity
    {
        private int _moduleID;
        private int _tabID;
        
        public ServiceSecurity(int moduleID, int tabID)
        {
            _moduleID = moduleID;
            _tabID = tabID;
        }

        public bool HasPerm(string permissionkey)
        {
            return ModulePermissionController.HasModulePermission(_moduleID, _tabID, permissionkey);

        }

        public bool CanEdit()
        {
            return HasPerm("EDIT");
        }

        
    }
}